-
-
Notifications
You must be signed in to change notification settings - Fork 80
Python version and pre-commit #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pyproject.toml
Outdated
|
|
||
| [tool.poetry.dependencies] | ||
| python = ">=3.10,<3.13" | ||
| python = ">=3.10,<3.14" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| python = ">=3.10,<3.14" | |
| python = ">=3.10" |
Then we don't have to change it in the future. If poetry lock fails with this, we can limit the python version in individual dependencies instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pybricks-micropython% poetry lock
Resolving dependencies... (5.9s)
The current project's supported Python range (>=3.10) is not compatible with some of the required packages Python requirement:
- pybricksdev requires Python <3.14,>=3.10, so it will not be installable for Python >=3.14
- pybricks requires Python <4.0,>=3.8, so it will not be installable for Python >=4.0
- pybricks requires Python >=3.8,<4.0, so it will not be installable for Python >=4.0
- pybricks requires Python >=3.8,<4.0, so it will not be installable for Python >=4.0
- pybricks requires Python >=3.8,<4.0, so it will not be installable for Python >=4.0
- pybricks requires Python >=3.8,<4.0, so it will not be installable for Python >=4.0
- pybricks requires Python >=3.8,<4.0, so it will not be installable for Python >=4.0
- pybricks requires Python <4.0,>=3.8, so it will not be installable for Python >=4.0
- pybricks requires Python <4.0,>=3.8, so it will not be installable for Python >=4.0
Because no versions of pybricksdev match >1.2.0,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1
and pybricksdev (2.0.0) depends on pybricks (>=3), pybricksdev (>1.2.0,<2.0.1 || >2.0.1) requires pybricks (>=3).
(1) So, because pybricksdev (2.0.1) depends on pybricks (>=3), pybricksdev (>1.2.0) requires pybricks (>=3).
Because no versions of pybricks match >=3,<3.1.0 || >3.1.0,<3.2.0 || >3.2.0,<3.3.0 || >3.3.0,<3.4.0 || >3.4.0,<3.4.1 || >3.4.1,<3.5.0 || >3.5.0,<3.6.0 || >3.6.0,<3.6.1 || >3.6.1,<4.0.0
and pybricks (3.1.0) requires Python >=3.8,<4.0, pybricks is forbidden.
And because pybricks (3.2.0) requires Python >=3.8,<4.0
and pybricks (3.3.0) requires Python >=3.8,<4.0, pybricks is forbidden.
And because pybricks (3.4.0) requires Python >=3.8,<4.0
and pybricks (3.4.1) requires Python >=3.8,<4.0, pybricks is forbidden.
And because pybricks (3.5.0) requires Python <4.0,>=3.8
and pybricks (3.6.0) requires Python <4.0,>=3.8, pybricks is forbidden.
And because pybricksdev (>1.2.0) requires pybricks (>=3) (1), pybricksdev (>1.2.0) requires pybricks (3.6.1 || >=4.0.0)
And because pybricksdev (1.2.0) requires Python <3.14,>=3.10
and pybricks (3.6.1) requires Python <4.0,>=3.8, pybricksdev (>=1.2.0) requires pybricks (>=4.0.0).
So, because pybricks-micropython depends on both pybricks (^3.0.0a5) and pybricksdev (>=1.2.0), version solving failed.
* Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For pybricksdev, a possible solution would be to set the `python` property to ">=3.10,<3.14"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
For pybricks, a possible solution would be to set the `python` property to ">=3.10,<4.0"
https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers
I think ">=3.10,<4.0" would be safer, but it would at least mean to update the pybrickdev dep to 2.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... yeah, I guess since this isn't a library that others are depending on, that is fine.
CONTRIBUTING.md
Outdated
| This will automatically fix common problems in files that follow the MicroPython | ||
| style. | ||
|
|
||
| This can be run automatically using pre-commit. Install pre-commit, then run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This can be run automatically using pre-commit. Install pre-commit, then run: | |
| This can be run automatically using `pre-commit`. Install [pre-commit], then run: |
And at the end of the section...
[pre-commit]: https://pre-commit.com/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or since it is a Python package, we could just add it as a development dependency so there isn't a separate install step.
CONTRIBUTING.md
Outdated
|
|
||
| pre-commit install | ||
|
|
||
| It will install a pre-commit hook for this repository. On every commit, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| It will install a pre-commit hook for this repository. On every commit, the | |
| It will install a pre-commit git hook for this repository. On every commit, the |
CONTRIBUTING.md
Outdated
| pre-commit install | ||
|
|
||
| It will install a pre-commit hook for this repository. On every commit, the | ||
| coding style will be checked before the commit is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked or automatically formatted?
Debian Trixie ships Python 3.13, this makes Debian users life easier.
Also document the usage in CONTRIBUTING.md.
724d839 to
170de96
Compare
|
I made the changes, I do not know why github actions is stuck… |
|
No source code files changed, so nothing triggered that job. It's normal. |
|
Merged, thanks! |
Allow usage of python version 3.13 as this is the one shipped with Debian stable since Trixie. This will make life easier for Debian users.
Add pre-commit configuration to automatically check coding style on commit. This is a useful tool, tell me what you think about it.